let data = {
    pagenum: 1,
    pagesize: 3
}
$.ajax({
    url: "/my/article/list",
    type: "GET",
    data: {
        pagenum: data.pagenum,
        pagesize: data.pagesize
    },
    success: function (res) {
        console.log(res.data);
        if (res.status == 0) {
            let trs = ""
            res.data.forEach(ele => {
                trs += `<tr>
              <td>${ele.title}</td>
              <td>${ele.cate_name}</td>
              <td>${ele.pub_date.slice(0, ele.pub_date.length - 4)}</td>
              <td>${ele.state}</td>
              <th>
                <!-- 编辑按钮 -->
                <a href="/article/edit.html?id=${ele.Id}" class="layui-btn layui-btn-xs">编辑</a>
                <!-- 删除按钮 -->
                <button data-id="${ele.Id}" type="button" class="layui-btn layui-btn-xs layui-btn-danger">删除</button>
              </th>
            </tr>`
            });
            $("tbody").html(trs)
        }
    }
})